<template>
    <div>
        <el-image  v-bind="$attrs" v-on="$listeners" :src="fieldValue" :preview-src-list="srcList"></el-image>
    </div>
</template>

<script>
  export default {
    props: {
      value: {
        type: [String,Array]
      }
    },
    data(){
        return {
            url:'',
            srcList:[]
        }
    },
    computed: {
      fieldValue: {
        get() {
          console.log(1111111111);
            // if(typeof this.value === 'array') {
            //     this.srcList = this.value;
            //     this.url = this.value[0];
            // }else{
            //     this.url = this.value;
            //     this.srcList,push(this.value);
            // }
          return this.url 
        },
        set(val) {
          this.$emit('input', val)
        }
      }
    }
  }
</script>